package com.xiaouyudeguang.common.event;

import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.springframework.context.ApplicationEvent;

@Setter
@Getter
@Builder
@EqualsAndHashCode(callSuper = false)
public class WsEvent extends ApplicationEvent {

    private String sessionId;

    private Type type;

    public WsEvent(String sessionId, Type type) {
        super(sessionId);
        this.sessionId = sessionId;
        this.type = type;
    }

    public enum Type {
        CONNECTED, DISCONNECT;
    }
}
